# Maintainer:

pkgname=python-fastbencode
pkgver=0.2
pkgrel=2
pkgdesc='Implementation of bencode with optional fast C extensions'
arch=(x86_64)
url='https://github.com/breezy-team/fastbencode'
license=(GPL2)
depends=(python)
makedepends=(python-build python-installer cython python-setuptools python-wheel)
source=(https://pypi.io/packages/source/f/fastbencode/fastbencode-$pkgver.tar.gz)
sha256sums=('578eb9c4700d6705d71fbc8d7d57bca2cd987eca2cec1d9e77b9e0702db1e56f')

build() {
  cd fastbencode-$pkgver
  python -m build --wheel --no-isolation
}

check() {
  cd fastbencode-$pkgver
  python -m unittest discover -vs fastbencode/tests
}

package() {
  cd fastbencode-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
}
